﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProblemManagement.aspx.cs" Inherits="bts_webapp.ProblemManagement" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.2.915.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="width:1000px">
        <h2>Quản lý sự cố</h2>
    </div>
    
    <div style="width:1000px">
        <asp:ScriptManager ID="scriptMan" runat="server" />

        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Windows7" />

        <telerik:RadGrid Skin="Windows7" runat="server" ID="RadGrid1" AutoGenerateColumns="false" OnItemCommand="RadGrid1_ItemCommand"
            AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
            OnItemCreated="RadGrid1_ItemCreated" OnDeleteCommand="RadGrid1_DeleteCommand" AllowSorting="true" 
            OnInsertCommand="RadGrid1_InsertCommand" OnItemDataBound="RadGrid1_ItemDataBound" AllowFilteringByColumn="True">
            <MasterTableView CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" >
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="ColumnEdit" />

                    <telerik:GridBoundColumn DataField="SuCo_Id" HeaderText="Mã sự cố" UniqueName="SuCo_Id" SortExpression="SuCo_Id" Visible="false" />

                    <telerik:GridBoundColumn DataField="Tram_Id" HeaderText="Mã trạm" UniqueName="Tram_Id" SortExpression="Tram_Id" Visible="false"  />
                    <telerik:GridBoundColumn DataField="Tram_Name" HeaderText="Tên trạm" UniqueName="Tram_Name" SortExpression="Tram_Name" />

                    <telerik:GridBoundColumn DataField="Luong_Id" HeaderText="Mã luồng" UniqueName="Luong_Id" SortExpression="Luong_Id" Visible="false"  />
                    <telerik:GridBoundColumn DataField="Luong_Name" HeaderText="Tên luồng" UniqueName="Luong_Name" SortExpression="Luong_Name" />

                    <telerik:GridBoundColumn DataField="ThietBi_Id" HeaderText="Mã thiết bị" UniqueName="ThietBi_Id" SortExpression="ThietBi_Id" Visible="false" />
                    <telerik:GridBoundColumn DataField="ThietBi_Name" HeaderText="Tên thiết bị" UniqueName="ThietBi_Name" SortExpression="ThietBi_Name" />

                    <telerik:GridBoundColumn DataField="User_Id" HeaderText="Mã người dùng" UniqueName="User_Id" SortExpression="User_Id" Visible="false"  />
                    <telerik:GridBoundColumn DataField="User_Name" HeaderText="Tên người dùng" UniqueName="User_Name" SortExpression="User_Name" />

                    <telerik:GridBoundColumn DataField="SuCo_TenSuCo" HeaderText="Tên sự cố" UniqueName="SuCo_TenSuCo" SortExpression="SuCo_TenSuCo" />
                    <telerik:GridBoundColumn DataField="SuCo_NgayGio" HeaderText="Ngày giờ" UniqueName="SuCo_NgayGio" SortExpression="SuCo_NgayGio" />
                    <telerik:GridBoundColumn DataField="SuCo_NoiDungSuCo" HeaderText="Nội dung sự cố" UniqueName="SuCo_NoiDungSuCo" SortExpression="SuCo_NoiDungSuCo" />
                    <telerik:GridBoundColumn DataField="SuCo_GhiChu" HeaderText="Ghi chú" UniqueName="SuCo_GhiChu" SortExpression="SuCo_GhiChu" />
                    <telerik:GridBoundColumn DataField="Status" HeaderText="Trạng thái" UniqueName="Status" SortExpression="Status" AllowFiltering="false" />

                    <telerik:GridButtonColumn ConfirmText="Bạn có muốn xóa sự cố này ?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" UniqueName="ColumnDelete" />
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UxProblem.ascx">
                    <EditColumn ButtonType="ImageButton" />
                </EditFormSettings>
            </MasterTableView>

            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
            
        </telerik:RadGrid>

    </div>
</asp:Content>
